package cn.yeyiu.sexyiu.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Button;

import cn.yeyiu.sexyiu.R;
import cn.yeyiu.util.ExternalJSONFile;
import cn.yeyiu.util.FileUtil;

public class SettingActivity extends AppCompatActivity {

    private Button b1;
    private Button b2;
    private Button b3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);

        b1 = findViewById(R.id.b1);
        b2 = findViewById(R.id.b2);
        b3 = findViewById(R.id.b3);

        b1.setOnClickListener(v->{
            FileUtil.removeAndroidDataFile(this, ExternalJSONFile.recent+".json");
        });
        b2.setOnClickListener(v->{
            FileUtil.removeAndroidDataFile(this, ExternalJSONFile.favour+".json");
        });
        b3.setOnClickListener(v->{
            FileUtil.removeAndroidDataDownload(this);
        });
    }
}